#ifndef CLIENT_H
#define CLIENT_H

#include <SFML/Network.hpp>
#include <QString>
#include <QInputDialog>
#include <QApplication>
#include <QMessageBox>
#include <list>
#include <iostream>

#define DEBUG true

class Client
{
private:
    bool* estOk;

public:
    bool isConnectedMain;
    bool isConnectedGame;

    sf::IpAddress _addr;
    short _portMainServ;
    short _portGameServ;

    sf::TcpSocket _sockMainServ;
    sf::TcpSocket _sockGameServ;
    sf::SocketSelector _selector;

    QString _pseudo;

    Client(std::string addr, short portMS, short portGS, bool* c);

    void send(sf::Packet & p, bool MainServ);
    void recv(sf::Packet & p, bool MainServ);

    bool getPseudo();
};

#endif // CLIENT_H
